Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

fix(index): fallback to fs if this.fs is undefined #45

Merged
merged 6 commits into from
Oct 31, 2018
Merged

fix(index): fallback to fs if this.fs is undefined #45

merged 6 commits into from
Oct 31, 2018

Conversation

jsg2021
Copy link
Contributor

@jsg2021 jsg2021 commented Oct 30, 2018

Fixes undefined this.fs when behind thread-loader

Fix for undefined `this.fs` when behind thread-loader
@michael-ciniawsky michael-ciniawsky changed the title use the compiler's cached fs for stats if there, otherwise, fallback fix(index): fallback to fs if this.fs is undefined Oct 30, 2018
michael-ciniawsky and others added 3 commits October 30, 2018 14:32
Co-Authored-By: jsg2021 <[email protected]>
Co-Authored-By: jsg2021 <[email protected]>
Co-Authored-By: jsg2021 <[email protected]>
src/index.js Outdated
// this.fs can be undefined
// e.g when using the thread-loader
// fallback to the fs module
const stat = this.fs ? this.fs.stat : fs.stat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indent and ;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Apply Suggestion feature is pretty neat. :)

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsg2021 Thx

@jsg2021
Copy link
Contributor Author

jsg2021 commented Oct 30, 2018

No problem! :)

@gusvargas
Copy link
Contributor

I wrote up a concern in the larger issue: #43 (comment)

Co-Authored-By: jsg2021 <[email protected]>
@codecov
Copy link

codecov bot commented Oct 30, 2018

Codecov Report

Merging #45 into master will decrease coverage by 0.16%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #45      +/-   ##
=========================================
- Coverage   17.47%   17.3%   -0.17%     
=========================================
  Files           2       2              
  Lines         103     104       +1     
  Branches       13      14       +1     
=========================================
  Hits           18      18              
  Misses         73      73              
- Partials       12      13       +1
Impacted Files Coverage Δ
src/index.js 17.47% <0%> (-0.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91d2a18...804e364. Read the comment docs.

@michael-ciniawsky
Copy link
Member

Released in v1.2.4 🎉

@michael-ciniawsky michael-ciniawsky removed this from the 1.2.4 milestone Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants